package leetcode_0665

import "fmt"

func checkPossibility(nums []int) bool {

	var aa interface{}
	aa = []uint{1}
	if _, ok := aa.([]int); ok {
		fmt.Println(111)
	} else {
		fmt.Println(222)
	}

	plus := 0
	for i := 1; i < len(nums); i++ {

		if nums[i-1] > nums[i] {
			if i == 1 || nums[i] >= nums[i-2] {
				nums[i-1] = nums[i]
			} else {
				nums[i] = nums[i-1]
			}

			plus++
		}

	}

	return plus <= 1
}
